<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>支付</title>
    <link type="text/css" rel="stylesheet" href="../static/css/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="../static/css/style.css">
    <style>
        html,
        body {
            /*background-color: #f9f9f9;*/
            background: #f9f9f9;
        }

        .layui-m-layer0 .layui-m-layercont {
            background-color: #ffffff;
            /*border-top-left-radius: 5px;*/
            /*border-top-right-radius: 5px;*/
            /*color: #ffffff;*/
        }

        .scrBtn {
            background-color: #1AAD19;
            box-shadow: none;
        }
    </style>
</head>
<body class="uf uf-ver">
<a class="_back" href="javascript:goWinBack();"><i class="fa fa-angle-left" aria-hidden="true"></i><span
        style="font-size: 1.25rem;padding-left: .6rem;">返回</span></a>

<div class="_titleTxt" style="color: #333333;">支付</div>

<div id="payContent" class="uf uf-ver uf-ac">
    <div style="font-size: 2rem;margin:3rem 0;text-align: center;color: #333333;">
        <span id="totalFee" style="font-size: 3rem">0.01</span>元
    </div>
    <button onclick="orderPay();" type="button" class="scrBtn">支付
    </button>

    <!--<div style="font-size: 1.5rem;margin-top:3rem;text-align: center;color: #333333;"><i style="font-size: 3.5rem;color: #1AAD19;" class="fa fa-check-circle" aria-hidden="true"></i><br/><br/>支付成功!</div>-->
</div>

<script type="text/javascript" src="../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../static/js/layer_mobile/layer.js"></script>
<script type="text/javascript" src="../static/js/jqToast.js"></script>
<script type="text/javascript" src="../static/js/tool.js"></script>
<script>
    //创建订单
    function orderPay() {
        var totalFee = $("#totalFee").text() * 1;
        //todo 调用支付
        // alert('支付：' + totalFee);
        layer.open({
            content: '<a href="javascript:payChoose(1);" class="logoLine logo_yi">翼支付</a><a href="javascript:payChoose(2);" class="logoLine logo_we">微信支付</a>'
        });

        //todo 支付成功后回调
        // paySucceed();
    }

    function payChoose(t) {
        layer.closeAll();
        $('button.scrBtn').attr("disabled", 'disabled');
        switch (t) {
            case 1:
                console.log("翼支付");
                break;
            case 2:
                console.log("微信支付");
                break;
        }
    }

    function paySucceed() { //支付成功后
        var succeedHtml = '<div style="font-size: 1.5rem;margin-top:3rem;text-align: center;color: #333333;"><i style="font-size: 3.5rem;color: #1AAD19;" class="fa fa-check-circle" aria-hidden="true"></i><br/><br/>支付成功!</div>';
        $("#payContent").html(succeedHtml);
    }
</script>
</body>
</html>